/*
 * To change this license header, choose License Headers in Project Properties.
 * To change this template file, choose Tools | Templates
 * and open the template in the editor.
 */

package glamourbeautyclinic;


import glamourbeautyclinic.personel.*;
import java.awt.Dimension;
import java.awt.Toolkit;
import images.GlamourImage;
import java.util.Vector;
import javax.swing.DefaultComboBoxModel;
import javax.swing.ImageIcon;
import javax.swing.JTable;
import javax.swing.RowSorter;
import javax.swing.table.DefaultTableModel;
import javax.swing.table.TableModel;
import javax.swing.table.TableRowSorter;
import util.DBConnection;
import util.ImageBackgroundPanel;




/**
 *
 * @author anh
 */
public class FrmAccount extends javax.swing.JInternalFrame {
    //Declare for EVERY form
    GlamourImage GI = new GlamourImage();
    
    //Use for JTable and JComboBox component 
    DefaultComboBoxModel cboModel;
    DefaultTableModel tblModel;
    Vector row;
    RowSorter<TableModel> sorter = new TableRowSorter<TableModel>(tblModel);
    JTable j = new JTable(tblModel);
    //j.setRowSorter(sorter); use to sort table
    
    //Declare for CONCRETE form
    
    
    /**
     * Creates new form frmSearchCustomer
     */
    public FrmAccount(DBConnection dc) {
        //this.setContentPane(new ImageBackgroundPanel(new ImageIcon(GI.getClass().getResource("Frame.png"))));
        initComponents();
        
        GI.addIconFor(this);
        Dimension screenSize = Toolkit.getDefaultToolkit().getScreenSize();
        // Can be resize height parameter to proper scale
        this.setLocation((screenSize.width - this.getWidth()) / 2, 10);
        
    }

    /**
     * This method is called from within the constructor to initialize the form.
     * WARNING: Do NOT modify this code. The content of this method is always
     * regenerated by the Form Editor.
     */
    @SuppressWarnings("unchecked")
    // <editor-fold defaultstate="collapsed" desc="Generated Code">//GEN-BEGIN:initComponents
    private void initComponents() {

        pnlLookup = new javax.swing.JPanel();
        lblStaffID_S = new javax.swing.JLabel();
        txtUsername_S = new javax.swing.JTextField();
        jScrollPane1 = new javax.swing.JScrollPane();
        tblAccount = new javax.swing.JTable();
        btnAll = new javax.swing.JButton();
        btnDes = new javax.swing.JButton();
        btnLock = new javax.swing.JButton();
        lblFoundMsg = new javax.swing.JLabel();
        lblStaffName_S = new javax.swing.JLabel();
        chkActive_S = new javax.swing.JCheckBox();
        cbxRole_S = new javax.swing.JComboBox();
        btnSearch = new javax.swing.JButton();
        pnlDetails = new javax.swing.JPanel();
        lblStaffID_D = new javax.swing.JLabel();
        txtUsername_D = new javax.swing.JTextField();
        lblStaffIDMsg = new javax.swing.JLabel();
        lblStaffName_D = new javax.swing.JLabel();
        lblAdd_D = new javax.swing.JLabel();
        lblActive_D = new javax.swing.JLabel();
        lblStaffNameMsg = new javax.swing.JLabel();
        lblRequired1 = new javax.swing.JLabel();
        lblRequired2 = new javax.swing.JLabel();
        cbxRole = new javax.swing.JComboBox();
        txtPass = new javax.swing.JPasswordField();
        chkActive_S1 = new javax.swing.JCheckBox();
        pnlButton = new javax.swing.JPanel();
        btnInsert = new javax.swing.JButton();
        btnUpdate = new javax.swing.JButton();
        btnExit = new javax.swing.JButton();

        setClosable(true);
        setIconifiable(true);
        setTitle("Account Management");
        setMaximumSize(new java.awt.Dimension(672, 634));

        pnlLookup.setOpaque(false);

        lblStaffID_S.setDisplayedMnemonic('f');
        lblStaffID_S.setFont(new java.awt.Font("Tahoma", 1, 11)); // NOI18N
        lblStaffID_S.setForeground(new java.awt.Color(0, 51, 255));
        lblStaffID_S.setLabelFor(txtUsername_S);
        lblStaffID_S.setText("Username");
        lblStaffID_S.setFocusable(false);
        lblStaffID_S.setPreferredSize(new java.awt.Dimension(38, 20));
        lblStaffID_S.setRequestFocusEnabled(false);

        txtUsername_S.setForeground(new java.awt.Color(0, 102, 51));
        txtUsername_S.setPreferredSize(new java.awt.Dimension(56, 20));

        tblAccount.setForeground(new java.awt.Color(0, 102, 51));
        tblAccount.setModel(new javax.swing.table.DefaultTableModel(
            new Object [][] {
                {null, "Kenji Le", "Service Employee",  new Boolean(true)},
                {null, "John Smith", "Administrator",  new Boolean(true)},
                {null, "Kenny", "Cashier",  new Boolean(false)},
                {null, null, null, null}
            },
            new String [] {
                "Select", "Username", "Role", "Active"
            }
        ) {
            Class[] types = new Class [] {
                java.lang.Boolean.class, java.lang.Object.class, java.lang.Object.class, java.lang.Boolean.class
            };
            boolean[] canEdit = new boolean [] {
                false, false, false, false
            };

            public Class getColumnClass(int columnIndex) {
                return types [columnIndex];
            }

            public boolean isCellEditable(int rowIndex, int columnIndex) {
                return canEdit [columnIndex];
            }
        });
        tblAccount.setOpaque(false);
        jScrollPane1.setViewportView(tblAccount);

        btnAll.setFont(new java.awt.Font("Tahoma", 1, 11)); // NOI18N
        btnAll.setForeground(new java.awt.Color(0, 51, 51));
        btnAll.setIcon(new javax.swing.ImageIcon(getClass().getResource("/images/SelectAll.png"))); // NOI18N
        btnAll.setMnemonic('a');
        btnAll.setText("Select all");
        btnAll.setBorder(null);
        btnAll.setContentAreaFilled(false);
        btnAll.setCursor(new java.awt.Cursor(java.awt.Cursor.HAND_CURSOR));
        btnAll.setMargin(new java.awt.Insets(6, 6, 6, 6));
        btnAll.setName(""); // NOI18N
        btnAll.setOpaque(true);
        btnAll.setPreferredSize(new java.awt.Dimension(59, 22));
        btnAll.setRolloverEnabled(false);

        btnDes.setFont(new java.awt.Font("Tahoma", 1, 11)); // NOI18N
        btnDes.setForeground(new java.awt.Color(0, 51, 51));
        btnDes.setIcon(new javax.swing.ImageIcon(getClass().getResource("/images/Deselect.png"))); // NOI18N
        btnDes.setMnemonic('e');
        btnDes.setText("Deselect");
        btnDes.setBorder(null);
        btnDes.setContentAreaFilled(false);
        btnDes.setCursor(new java.awt.Cursor(java.awt.Cursor.HAND_CURSOR));
        btnDes.setMargin(new java.awt.Insets(6, 6, 6, 6));
        btnDes.setName(""); // NOI18N
        btnDes.setOpaque(true);
        btnDes.setPreferredSize(new java.awt.Dimension(59, 22));
        btnDes.setRolloverEnabled(false);

        btnLock.setFont(new java.awt.Font("Tahoma", 1, 11)); // NOI18N
        btnLock.setForeground(new java.awt.Color(0, 51, 51));
        btnLock.setIcon(new javax.swing.ImageIcon(getClass().getResource("/images/Lock.png"))); // NOI18N
        btnLock.setMnemonic('L');
        btnLock.setText("Lock");
        btnLock.setToolTipText("Inactive staff");
        btnLock.setBorder(null);
        btnLock.setContentAreaFilled(false);
        btnLock.setCursor(new java.awt.Cursor(java.awt.Cursor.HAND_CURSOR));
        btnLock.setMargin(new java.awt.Insets(6, 6, 6, 6));
        btnLock.setName(""); // NOI18N
        btnLock.setOpaque(true);
        btnLock.setPreferredSize(new java.awt.Dimension(59, 22));
        btnLock.setRolloverEnabled(false);

        lblFoundMsg.setForeground(new java.awt.Color(0, 0, 255));
        lblFoundMsg.setText("0 records found");

        lblStaffName_S.setDisplayedMnemonic('e');
        lblStaffName_S.setFont(new java.awt.Font("Tahoma", 1, 11)); // NOI18N
        lblStaffName_S.setForeground(new java.awt.Color(0, 51, 255));
        lblStaffName_S.setText("Role");
        lblStaffName_S.setFocusable(false);
        lblStaffName_S.setPreferredSize(new java.awt.Dimension(38, 20));
        lblStaffName_S.setRequestFocusEnabled(false);

        chkActive_S.setBackground(new java.awt.Color(255, 255, 255));
        chkActive_S.setForeground(new java.awt.Color(0, 102, 51));
        chkActive_S.setText("Active");
        chkActive_S.setBorder(null);
        chkActive_S.setHorizontalAlignment(javax.swing.SwingConstants.CENTER);
        chkActive_S.setOpaque(false);
        chkActive_S.setPreferredSize(new java.awt.Dimension(51, 20));

        cbxRole_S.setForeground(new java.awt.Color(0, 102, 51));
        cbxRole_S.setModel(new javax.swing.DefaultComboBoxModel(new String[] { "Item 1", "Item 2", "Item 3", "Item 4" }));

        btnSearch.setFont(new java.awt.Font("Tahoma", 1, 11)); // NOI18N
        btnSearch.setForeground(new java.awt.Color(0, 51, 51));
        btnSearch.setIcon(new javax.swing.ImageIcon(getClass().getResource("/images/Search.png"))); // NOI18N
        btnSearch.setMnemonic('S');
        btnSearch.setText("Search");
        btnSearch.setToolTipText("");
        btnSearch.setBorder(null);
        btnSearch.setContentAreaFilled(false);
        btnSearch.setCursor(new java.awt.Cursor(java.awt.Cursor.HAND_CURSOR));
        btnSearch.setMargin(new java.awt.Insets(6, 6, 6, 6));
        btnSearch.setName(""); // NOI18N
        btnSearch.setOpaque(true);
        btnSearch.setPreferredSize(new java.awt.Dimension(59, 22));
        btnSearch.setRolloverEnabled(false);

        javax.swing.GroupLayout pnlLookupLayout = new javax.swing.GroupLayout(pnlLookup);
        pnlLookup.setLayout(pnlLookupLayout);
        pnlLookupLayout.setHorizontalGroup(
            pnlLookupLayout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)
            .addGroup(pnlLookupLayout.createSequentialGroup()
                .addContainerGap()
                .addGroup(pnlLookupLayout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)
                    .addGroup(javax.swing.GroupLayout.Alignment.TRAILING, pnlLookupLayout.createSequentialGroup()
                        .addGap(0, 0, Short.MAX_VALUE)
                        .addComponent(lblFoundMsg, javax.swing.GroupLayout.PREFERRED_SIZE, 89, javax.swing.GroupLayout.PREFERRED_SIZE))
                    .addGroup(pnlLookupLayout.createSequentialGroup()
                        .addGroup(pnlLookupLayout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)
                            .addComponent(jScrollPane1)
                            .addGroup(pnlLookupLayout.createSequentialGroup()
                                .addGroup(pnlLookupLayout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING, false)
                                    .addGroup(pnlLookupLayout.createSequentialGroup()
                                        .addComponent(btnAll, javax.swing.GroupLayout.PREFERRED_SIZE, 79, javax.swing.GroupLayout.PREFERRED_SIZE)
                                        .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.RELATED)
                                        .addComponent(btnDes, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, Short.MAX_VALUE))
                                    .addGroup(pnlLookupLayout.createSequentialGroup()
                                        .addComponent(lblStaffID_S, javax.swing.GroupLayout.PREFERRED_SIZE, 60, javax.swing.GroupLayout.PREFERRED_SIZE)
                                        .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.RELATED)
                                        .addComponent(txtUsername_S, javax.swing.GroupLayout.PREFERRED_SIZE, 93, javax.swing.GroupLayout.PREFERRED_SIZE)))
                                .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.RELATED)
                                .addGroup(pnlLookupLayout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)
                                    .addGroup(pnlLookupLayout.createSequentialGroup()
                                        .addComponent(lblStaffName_S, javax.swing.GroupLayout.PREFERRED_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.PREFERRED_SIZE)
                                        .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.UNRELATED)
                                        .addComponent(cbxRole_S, javax.swing.GroupLayout.PREFERRED_SIZE, 135, javax.swing.GroupLayout.PREFERRED_SIZE)
                                        .addGap(18, 18, 18)
                                        .addComponent(chkActive_S, javax.swing.GroupLayout.PREFERRED_SIZE, 63, javax.swing.GroupLayout.PREFERRED_SIZE)
                                        .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.RELATED, 8, Short.MAX_VALUE)
                                        .addComponent(btnSearch, javax.swing.GroupLayout.PREFERRED_SIZE, 68, javax.swing.GroupLayout.PREFERRED_SIZE))
                                    .addGroup(pnlLookupLayout.createSequentialGroup()
                                        .addComponent(btnLock, javax.swing.GroupLayout.PREFERRED_SIZE, 68, javax.swing.GroupLayout.PREFERRED_SIZE)
                                        .addGap(0, 0, Short.MAX_VALUE)))))
                        .addContainerGap())))
        );
        pnlLookupLayout.setVerticalGroup(
            pnlLookupLayout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)
            .addGroup(pnlLookupLayout.createSequentialGroup()
                .addGroup(pnlLookupLayout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)
                    .addComponent(lblStaffID_S, javax.swing.GroupLayout.Alignment.TRAILING, javax.swing.GroupLayout.PREFERRED_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.PREFERRED_SIZE)
                    .addComponent(txtUsername_S, javax.swing.GroupLayout.Alignment.TRAILING, javax.swing.GroupLayout.PREFERRED_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.PREFERRED_SIZE)
                    .addGroup(javax.swing.GroupLayout.Alignment.TRAILING, pnlLookupLayout.createParallelGroup(javax.swing.GroupLayout.Alignment.BASELINE)
                        .addComponent(lblStaffName_S, javax.swing.GroupLayout.PREFERRED_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.PREFERRED_SIZE)
                        .addComponent(chkActive_S, javax.swing.GroupLayout.PREFERRED_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.PREFERRED_SIZE)
                        .addComponent(cbxRole_S, javax.swing.GroupLayout.PREFERRED_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.PREFERRED_SIZE)
                        .addComponent(btnSearch, javax.swing.GroupLayout.PREFERRED_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.PREFERRED_SIZE)))
                .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.RELATED, 10, Short.MAX_VALUE)
                .addGroup(pnlLookupLayout.createParallelGroup(javax.swing.GroupLayout.Alignment.BASELINE)
                    .addComponent(btnAll, javax.swing.GroupLayout.PREFERRED_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.PREFERRED_SIZE)
                    .addComponent(btnDes, javax.swing.GroupLayout.PREFERRED_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.PREFERRED_SIZE)
                    .addComponent(btnLock, javax.swing.GroupLayout.PREFERRED_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.PREFERRED_SIZE))
                .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.RELATED)
                .addComponent(jScrollPane1, javax.swing.GroupLayout.PREFERRED_SIZE, 159, javax.swing.GroupLayout.PREFERRED_SIZE)
                .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.RELATED)
                .addComponent(lblFoundMsg)
                .addGap(5, 5, 5))
        );

        pnlDetails.setBorder(javax.swing.BorderFactory.createTitledBorder(new javax.swing.border.LineBorder(new java.awt.Color(0, 0, 0), 1, true), "Details infomation", javax.swing.border.TitledBorder.DEFAULT_JUSTIFICATION, javax.swing.border.TitledBorder.DEFAULT_POSITION, new java.awt.Font("Arial", 0, 11), new java.awt.Color(0, 0, 255))); // NOI18N
        pnlDetails.setOpaque(false);

        lblStaffID_D.setDisplayedMnemonic('D');
        lblStaffID_D.setFont(new java.awt.Font("Tahoma", 1, 11)); // NOI18N
        lblStaffID_D.setForeground(new java.awt.Color(0, 51, 255));
        lblStaffID_D.setLabelFor(txtUsername_D);
        lblStaffID_D.setText("Username");
        lblStaffID_D.setPreferredSize(new java.awt.Dimension(38, 20));

        txtUsername_D.setForeground(new java.awt.Color(0, 102, 51));
        txtUsername_D.setPreferredSize(new java.awt.Dimension(56, 20));

        lblStaffIDMsg.setForeground(new java.awt.Color(255, 0, 0));
        lblStaffIDMsg.setText("Username cannot be blank");
        lblStaffIDMsg.setPreferredSize(new java.awt.Dimension(38, 20));

        lblStaffName_D.setDisplayedMnemonic('n');
        lblStaffName_D.setFont(new java.awt.Font("Tahoma", 1, 11)); // NOI18N
        lblStaffName_D.setForeground(new java.awt.Color(0, 51, 255));
        lblStaffName_D.setText("Password");
        lblStaffName_D.setPreferredSize(new java.awt.Dimension(38, 20));

        lblAdd_D.setDisplayedMnemonic('r');
        lblAdd_D.setFont(new java.awt.Font("Tahoma", 1, 11)); // NOI18N
        lblAdd_D.setForeground(new java.awt.Color(0, 51, 255));
        lblAdd_D.setText("Role");
        lblAdd_D.setPreferredSize(new java.awt.Dimension(38, 20));

        lblActive_D.setDisplayedMnemonic('t');
        lblActive_D.setFont(new java.awt.Font("Tahoma", 1, 11)); // NOI18N
        lblActive_D.setForeground(new java.awt.Color(0, 51, 255));
        lblActive_D.setText("Status");
        lblActive_D.setPreferredSize(new java.awt.Dimension(38, 20));

        lblStaffNameMsg.setForeground(new java.awt.Color(255, 0, 0));
        lblStaffNameMsg.setText("Password cannot be blank");
        lblStaffNameMsg.setPreferredSize(new java.awt.Dimension(38, 20));

        lblRequired1.setForeground(new java.awt.Color(255, 0, 0));
        lblRequired1.setText("(*)");
        lblRequired1.setPreferredSize(new java.awt.Dimension(38, 20));

        lblRequired2.setForeground(new java.awt.Color(255, 0, 0));
        lblRequired2.setText("(*)");
        lblRequired2.setPreferredSize(new java.awt.Dimension(38, 20));

        cbxRole.setForeground(new java.awt.Color(0, 102, 51));
        cbxRole.setModel(new javax.swing.DefaultComboBoxModel(new String[] { "Item 1", "Item 2", "Item 3", "Item 4" }));

        txtPass.setForeground(new java.awt.Color(0, 102, 51));
        txtPass.setText("jPasswordField1");

        chkActive_S1.setBackground(new java.awt.Color(255, 255, 255));
        chkActive_S1.setForeground(new java.awt.Color(0, 102, 51));
        chkActive_S1.setText("Active");
        chkActive_S1.setBorder(null);
        chkActive_S1.setHorizontalAlignment(javax.swing.SwingConstants.CENTER);
        chkActive_S1.setOpaque(false);
        chkActive_S1.setPreferredSize(new java.awt.Dimension(51, 20));

        javax.swing.GroupLayout pnlDetailsLayout = new javax.swing.GroupLayout(pnlDetails);
        pnlDetails.setLayout(pnlDetailsLayout);
        pnlDetailsLayout.setHorizontalGroup(
            pnlDetailsLayout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)
            .addGroup(pnlDetailsLayout.createSequentialGroup()
                .addGap(58, 58, 58)
                .addGroup(pnlDetailsLayout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING, false)
                    .addGroup(pnlDetailsLayout.createSequentialGroup()
                        .addGroup(pnlDetailsLayout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)
                            .addGroup(pnlDetailsLayout.createSequentialGroup()
                                .addComponent(lblStaffName_D, javax.swing.GroupLayout.PREFERRED_SIZE, 65, javax.swing.GroupLayout.PREFERRED_SIZE)
                                .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.RELATED)
                                .addComponent(lblRequired2, javax.swing.GroupLayout.PREFERRED_SIZE, 17, javax.swing.GroupLayout.PREFERRED_SIZE))
                            .addGroup(pnlDetailsLayout.createSequentialGroup()
                                .addComponent(lblStaffID_D, javax.swing.GroupLayout.PREFERRED_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.PREFERRED_SIZE)
                                .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.RELATED)
                                .addComponent(lblRequired1, javax.swing.GroupLayout.PREFERRED_SIZE, 17, javax.swing.GroupLayout.PREFERRED_SIZE)))
                        .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.UNRELATED)
                        .addGroup(pnlDetailsLayout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING, false)
                            .addComponent(txtUsername_D, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, Short.MAX_VALUE)
                            .addComponent(txtPass, javax.swing.GroupLayout.DEFAULT_SIZE, 177, Short.MAX_VALUE)))
                    .addGroup(pnlDetailsLayout.createSequentialGroup()
                        .addGroup(pnlDetailsLayout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)
                            .addComponent(lblAdd_D, javax.swing.GroupLayout.PREFERRED_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.PREFERRED_SIZE)
                            .addComponent(lblActive_D, javax.swing.GroupLayout.PREFERRED_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.PREFERRED_SIZE))
                        .addGap(33, 33, 33)
                        .addGroup(pnlDetailsLayout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)
                            .addComponent(chkActive_S1, javax.swing.GroupLayout.PREFERRED_SIZE, 63, javax.swing.GroupLayout.PREFERRED_SIZE)
                            .addComponent(cbxRole, 0, javax.swing.GroupLayout.DEFAULT_SIZE, Short.MAX_VALUE))))
                .addGap(18, 18, 18)
                .addGroup(pnlDetailsLayout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING, false)
                    .addComponent(lblStaffIDMsg, javax.swing.GroupLayout.DEFAULT_SIZE, 148, Short.MAX_VALUE)
                    .addComponent(lblStaffNameMsg, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, Short.MAX_VALUE))
                .addContainerGap(javax.swing.GroupLayout.DEFAULT_SIZE, Short.MAX_VALUE))
        );

        pnlDetailsLayout.linkSize(javax.swing.SwingConstants.HORIZONTAL, new java.awt.Component[] {lblActive_D, lblAdd_D, lblStaffID_D, lblStaffName_D});

        pnlDetailsLayout.setVerticalGroup(
            pnlDetailsLayout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)
            .addGroup(pnlDetailsLayout.createSequentialGroup()
                .addContainerGap()
                .addGroup(pnlDetailsLayout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)
                    .addGroup(pnlDetailsLayout.createSequentialGroup()
                        .addGroup(pnlDetailsLayout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)
                            .addComponent(txtUsername_D, javax.swing.GroupLayout.Alignment.TRAILING, javax.swing.GroupLayout.PREFERRED_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.PREFERRED_SIZE)
                            .addGroup(javax.swing.GroupLayout.Alignment.TRAILING, pnlDetailsLayout.createParallelGroup(javax.swing.GroupLayout.Alignment.BASELINE)
                                .addComponent(lblStaffID_D, javax.swing.GroupLayout.PREFERRED_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.PREFERRED_SIZE)
                                .addComponent(lblRequired1, javax.swing.GroupLayout.PREFERRED_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.PREFERRED_SIZE)))
                        .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.UNRELATED)
                        .addGroup(pnlDetailsLayout.createParallelGroup(javax.swing.GroupLayout.Alignment.BASELINE)
                            .addComponent(lblStaffName_D, javax.swing.GroupLayout.PREFERRED_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.PREFERRED_SIZE)
                            .addComponent(lblRequired2, javax.swing.GroupLayout.PREFERRED_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.PREFERRED_SIZE)
                            .addComponent(txtPass, javax.swing.GroupLayout.PREFERRED_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.PREFERRED_SIZE)
                            .addComponent(lblStaffNameMsg, javax.swing.GroupLayout.PREFERRED_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.PREFERRED_SIZE)))
                    .addComponent(lblStaffIDMsg, javax.swing.GroupLayout.PREFERRED_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.PREFERRED_SIZE))
                .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.UNRELATED)
                .addGroup(pnlDetailsLayout.createParallelGroup(javax.swing.GroupLayout.Alignment.BASELINE)
                    .addComponent(lblAdd_D, javax.swing.GroupLayout.PREFERRED_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.PREFERRED_SIZE)
                    .addComponent(cbxRole, javax.swing.GroupLayout.PREFERRED_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.PREFERRED_SIZE))
                .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.UNRELATED)
                .addGroup(pnlDetailsLayout.createParallelGroup(javax.swing.GroupLayout.Alignment.BASELINE)
                    .addComponent(lblActive_D, javax.swing.GroupLayout.PREFERRED_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.PREFERRED_SIZE)
                    .addComponent(chkActive_S1, javax.swing.GroupLayout.PREFERRED_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.PREFERRED_SIZE))
                .addContainerGap(javax.swing.GroupLayout.DEFAULT_SIZE, Short.MAX_VALUE))
        );

        pnlButton.setOpaque(false);

        btnInsert.setFont(new java.awt.Font("Tahoma", 1, 11)); // NOI18N
        btnInsert.setForeground(new java.awt.Color(0, 51, 51));
        btnInsert.setIcon(new javax.swing.ImageIcon(getClass().getResource("/images/Insert.png"))); // NOI18N
        btnInsert.setMnemonic('I');
        btnInsert.setText("Insert");
        btnInsert.setToolTipText("Add new staff");
        btnInsert.setBorder(null);
        btnInsert.setContentAreaFilled(false);
        btnInsert.setCursor(new java.awt.Cursor(java.awt.Cursor.HAND_CURSOR));
        btnInsert.setMargin(new java.awt.Insets(6, 6, 6, 6));
        btnInsert.setName(""); // NOI18N
        btnInsert.setOpaque(true);
        btnInsert.setPreferredSize(new java.awt.Dimension(59, 22));
        btnInsert.setRolloverEnabled(false);
        pnlButton.add(btnInsert);

        btnUpdate.setFont(new java.awt.Font("Tahoma", 1, 11)); // NOI18N
        btnUpdate.setForeground(new java.awt.Color(0, 51, 51));
        btnUpdate.setIcon(new javax.swing.ImageIcon(getClass().getResource("/images/Update.png"))); // NOI18N
        btnUpdate.setMnemonic('U');
        btnUpdate.setText("Update");
        btnUpdate.setToolTipText("Update staff");
        btnUpdate.setBorder(null);
        btnUpdate.setContentAreaFilled(false);
        btnUpdate.setCursor(new java.awt.Cursor(java.awt.Cursor.HAND_CURSOR));
        btnUpdate.setMargin(new java.awt.Insets(6, 6, 6, 6));
        btnUpdate.setName(""); // NOI18N
        btnUpdate.setOpaque(true);
        btnUpdate.setPreferredSize(new java.awt.Dimension(70, 22));
        btnUpdate.setRolloverEnabled(false);
        pnlButton.add(btnUpdate);

        btnExit.setFont(new java.awt.Font("Tahoma", 1, 11)); // NOI18N
        btnExit.setForeground(new java.awt.Color(0, 51, 51));
        btnExit.setIcon(new javax.swing.ImageIcon(getClass().getResource("/images/quit.png"))); // NOI18N
        btnExit.setMnemonic('x');
        btnExit.setText("Exit");
        btnExit.setToolTipText("Goodbye");
        btnExit.setBorder(null);
        btnExit.setContentAreaFilled(false);
        btnExit.setCursor(new java.awt.Cursor(java.awt.Cursor.HAND_CURSOR));
        btnExit.setMargin(new java.awt.Insets(6, 6, 6, 6));
        btnExit.setName(""); // NOI18N
        btnExit.setOpaque(true);
        btnExit.setPreferredSize(new java.awt.Dimension(59, 22));
        btnExit.setRolloverEnabled(false);
        pnlButton.add(btnExit);

        javax.swing.GroupLayout layout = new javax.swing.GroupLayout(getContentPane());
        getContentPane().setLayout(layout);
        layout.setHorizontalGroup(
            layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)
            .addComponent(pnlButton, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, Short.MAX_VALUE)
            .addGroup(layout.createSequentialGroup()
                .addContainerGap(javax.swing.GroupLayout.DEFAULT_SIZE, Short.MAX_VALUE)
                .addGroup(layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)
                    .addGroup(layout.createSequentialGroup()
                        .addComponent(pnlLookup, javax.swing.GroupLayout.PREFERRED_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.PREFERRED_SIZE)
                        .addContainerGap(javax.swing.GroupLayout.DEFAULT_SIZE, Short.MAX_VALUE))
                    .addGroup(layout.createSequentialGroup()
                        .addComponent(pnlDetails, javax.swing.GroupLayout.PREFERRED_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.PREFERRED_SIZE)
                        .addContainerGap(javax.swing.GroupLayout.DEFAULT_SIZE, Short.MAX_VALUE))))
        );
        layout.setVerticalGroup(
            layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)
            .addGroup(layout.createSequentialGroup()
                .addContainerGap()
                .addComponent(pnlLookup, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, Short.MAX_VALUE)
                .addGap(5, 5, 5)
                .addComponent(pnlDetails, javax.swing.GroupLayout.PREFERRED_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.PREFERRED_SIZE)
                .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.RELATED)
                .addComponent(pnlButton, javax.swing.GroupLayout.PREFERRED_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.PREFERRED_SIZE)
                .addGap(2, 2, 2))
        );

        pack();
    }// </editor-fold>//GEN-END:initComponents


    // Variables declaration - do not modify//GEN-BEGIN:variables
    private javax.swing.JButton btnAll;
    private javax.swing.JButton btnDes;
    private javax.swing.JButton btnExit;
    private javax.swing.JButton btnInsert;
    private javax.swing.JButton btnLock;
    private javax.swing.JButton btnSearch;
    private javax.swing.JButton btnUpdate;
    private javax.swing.JComboBox cbxRole;
    private javax.swing.JComboBox cbxRole_S;
    private javax.swing.JCheckBox chkActive_S;
    private javax.swing.JCheckBox chkActive_S1;
    private javax.swing.JScrollPane jScrollPane1;
    private javax.swing.JLabel lblActive_D;
    private javax.swing.JLabel lblAdd_D;
    private javax.swing.JLabel lblFoundMsg;
    private javax.swing.JLabel lblRequired1;
    private javax.swing.JLabel lblRequired2;
    private javax.swing.JLabel lblStaffIDMsg;
    private javax.swing.JLabel lblStaffID_D;
    private javax.swing.JLabel lblStaffID_S;
    private javax.swing.JLabel lblStaffNameMsg;
    private javax.swing.JLabel lblStaffName_D;
    private javax.swing.JLabel lblStaffName_S;
    private javax.swing.JPanel pnlButton;
    private javax.swing.JPanel pnlDetails;
    private javax.swing.JPanel pnlLookup;
    private javax.swing.JTable tblAccount;
    private javax.swing.JPasswordField txtPass;
    private javax.swing.JTextField txtUsername_D;
    private javax.swing.JTextField txtUsername_S;
    // End of variables declaration//GEN-END:variables
}
